#ifndef SHOW_TIMES_H
#define SHOW_TIMES_H
#include <cstring>
#include <vector>
template <typename T>
int show_times(const std::vector<T> &vec, const T val) {
  int showtimes = 0;
  for (size_t i = 0; i < vec.size(); ++i) {
    if (vec[i] == val) {
      ++showtimes;
    }
  }
  return showtimes;
}

//特例化char*
template <>
int show_times(const std::vector<char *> &vec, char *val) {
  int showtimes = 0;
  for (size_t i = 0; i < vec.size(); ++i) {
    if (strcmp(vec[i], val)) {
      ++showtimes;
    }
  }
  return showtimes;
}
#endif  // SHOW_TIMES_H